import request from "../../../../assets/js/request"

// 请求房屋数据
export function getHouseSource(pageMap){
  return request({
    url: '/house/getHouseSource',
    method: 'post',
    data: pageMap,
    headers :{
      "Content-Type" : "application/json"
    }
  })
}

// 删除数据
export function deleteHouse(ids){
  return request({
    url : '/house/deleteHouse',
    method : 'post',
    data : ids,
    headers :{
      "Content-Type" : "application/json"
    }
  })
}

// 更新发布状态
export function updatePublish(id,type){
  return request({
    url : '/house/updatePublish',
    method : 'get',
    params : {
      id : id,
      type : type
    },
    headers : {
      "Content-Type" : "application/json"
    }
  })
}

// 修改状态信息
export function updateStatus(id,type){
  return request({
    url : '/house/updateStatus',
    method : 'get',
    params : {
      id : id,
      type : type
    },
    headers : {
      "Content-Type" : "application/json"
    }
  })
}

export function searchHouse(searchData){
  return request({
    url : '/house/searchHouse',
    method : 'post',
    data : searchData,
  })
}
